<style>
    body{
        background-color: #f9f9f9;
    }
    .xh-form .btn{
        margin-right: 0px;
    }
    .xh-form tr{
        height: 45px;
    }
    .textbox-text .textbox-prompt{
        color: white;
    }
    .form-control[readonly]{
        background-color: white;
    }
    .tree-folder{
        clear: both;
        background: none;
    }
    .tree-folder-open{
        clear: both;
        background: none;
    }
    .fa{
        margin-top: 3px;
    }
    .tree-file{
        clear: both;
        background: none;
    }
    .combo{
        border-radius:4px
    }
    .switchbutton-on{
        background: #0079c8; color: #FFFFFF;
    }
    .switchbutton-off{
        background: grey; color: #FFFFFF;
    }

    .progress{position: relative;height:25px; width:130px;margin: 0 0;float: left}
    .progress_bg{height: 25px; border: 1px solid #ddd; overflow: hidden;background-color:#f2f2f2;}
    .progress_bar{background: #5FB878; width: 0; height: 25px;}
    .progress_btn{width: 10px; height: 25px;  position: absolute;background:#fff;left: 0px;top:0px; cursor: pointer;border:1px #ddd solid;box-sizing:border-box;}
    .progress_btn:hover{border-color:#F7B824;}　

</style>
<script>
    var members = {{ members |json_encode }};
</script>
<form id="xh_form" class="xh-form"  method="post"  action="{{ url("pm/task/saveTask") }}"  style="margin-left: 20px;">
    <div class="xh-area-form">
        <table style="width: 100%">
            <tr>
                <input name="selectProjectGrade" type="hidden" value="{{ selectProjectGrade }}">
                <input name="selectProjectId" type="hidden" value="{{ selectProjectId }}">
                <input name="ifTaskStats" id="ifTaskStats" type="hidden" value="{{ ifTaskStats }}">
                <input name="iTaskId" type="hidden">
                <td width="60"><label style="width: 60px">任务名称:</label></td>
                <td width="160"><input style="width: 160px" name="sTaskName" type="text" must="true" maxlength="50" autocomplete="off"></td>

                <td width="60"><label style="width: 60px;">父级任务:</label></td>
                <td width="160">
                    {% if selectProjectId>0 %}
                        <select id="father"  class="easyui-combotree"  name="iParentId" style="width: 160px;height: 34px "
                                data-options="url:'{{ url("pm/task/getTasks?selectProjectId=")~selectProjectId}}',
                                          required:false,panelHeight:150">
                        </select>
                        {% else %}
                            <select id="father"  class="easyui-combotree"  name="iParentId" style="width: 160px;height: 34px "
                                    data-options="url:'{{ url("pm/task/getTasks?projectId=")~iProjectId}}',
                                          required:false,panelHeight:150">
                            </select>
                    {% endif %}
                </td>
            </tr>
            <tr>
                <td width="60"><label style="width: 60px;">任务级别:</label></td>
                <td width="160">
                    <select id ='level'  name="iLevel" style="width:160px;height:34px">
                        {% for key ,value in task_levels %}
                        <option value = '{{key}}'>{{value}}</option>
                        {% endfor %}
                    </select>
                </td>

                <td width="60"><label>完成进度:</label></td>
                <td width="160">
                    <div class="progress">
                        <div class="progress_bg">
                            <div class="progress_bar"></div>
                        </div>
                        <div class="progress_btn"></div>
                    </div>
                    <div style="float: left;font-size: 12px;margin-left:2px;width: 25px;height: 30px;line-height: 27px;" class="text">0%</div>
                    <input type="hidden" name="iProcess" id="iProcess">
                </td>
            </tr>
            <tr>
                <td width="60"><label style="width: 60px;">负责人:</label></td>
                <td width="160">
                    <select id ='changeUserId'  name="changeUserId" style="width:160px;height:34px">
                        {% for key ,value in members %}
                            <option value = '{{value['iUserId']}}'>{{value['sStaffName']}}</option>
                        {% endfor %}
                    </select>
                </td>
                <td width="60"><label style="width: 60px;">执行人:</label></td>
                <td width="160">
                    <select id ='executor'  name="executorId" style="width:160px;height:34px">
                        {% for key ,value in members %}
                            <option value = '{{value['iUserId']}}'>{{value['sStaffName']}}</option>
                        {% endfor %}
                    </select>
                </td>
            </tr>
            <tr>
                <td width="60"><label style="width: 60px">参与人:</label></td>
                <td colspan="3" width="460">
                    <select name="memberIds[]" multiple="multiple"  id="mIds" style="width: 460px">
                    </select>
                </td>
            </tr>
            <tr>
                <td width="68"><label style="width:68px;">预开始时间</label></td>
                <td width="177"><input style="width:177px;" class="tFromAt" id="tFromAt" must="true" name="tFromAt" autocomplete="off" ></td>
                <td width="68"><label style="width:68px;">预完成时间</label></td>
                <td width="177"><input style="width:177px;" class="tEndAt"  name="tEndAt" id="tEndAt" must="true" autocomplete="off" ></td>
            </tr>
            <tr>
                <td width="60"><label style="width: 60px">预计工时:</label></td>
                <td width="160">
                    <input style="width: 160px ;height:32px;" id="dTaskTime" name="dTaskTime" placeholder="请填写完成任务所需工时"  type="text" maxlength="50" autocomplete="off">
                </td>

                <td width="80"><label style="width: 80px">是否公开:</label></td>
                <td width="100">
                    <input class="easyui-switchbutton"  id="bPublic" name="bPublic" checked data-options = "onText:'是',offText:'否',width:70,handleWidth:35,value:1">
                </td>
            </tr>
            <tr>
                <td valign="top"><label style="margin-top: 5px">任务内容:</label></td>
                <td colspan="3">
                    <textarea rows="3" name="sTaskContent" ></textarea>
                </td>
            </tr>
            <tr>
                <td valign="top"><label style="margin-top: 5px">备注:</label></td>
                <td colspan="3">
                    <textarea rows="2" name="sRemarks" ></textarea>
                </td>
            </tr>
        </table>
    </div>
    <div class="xh-area-button" style="padding-left: 75px;background-color: inherit">
        {% if FormButton is defined %}{{ FormButton }}{% endif %}
    </div>
</form>
</form>